Problems with tag O(n * logr)